﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AbingtonBooks.Pages.Books.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
   
    <script src="/Scripts/getAutoCompleteData.js"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="searchContainer">
     <asp:TextBox CssClass="wsite-form-input wsite-input search" ID="searchBox" placeholder="Search by Title, Author, ISBN, or Subject" runat="server"></asp:TextBox>
        </div>
        <asp:LinkButton CssClass="wsite-button" ID="searchButton" runat="server" 
            OnClick="searchButton_Click"><span class="wsite-button-inner">Search</span></asp:LinkButton>
    <asp:GridView CellPadding="8" ForeColor="White" GridLines="Horizontal" ID="BookGrid" runat="server" 
      AutoGenerateColumns="False"
      Width="100%">
      <Columns>
          <asp:TemplateField>
              <ItemTemplate>
                  
                  <asp:HyperLink ID="HyperLink1" NavigateUrl='<%#"/Pages/Books/ViewBook/Default.aspx?id=" + Eval("BookId") %>' runat="server">
                      <asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("Src") %>' />
                  </asp:HyperLink>
              </ItemTemplate>
          </asp:TemplateField>
          <asp:TemplateField HeaderText="Title">
              <ItemTemplate>
                  <asp:HyperLink ID="HyperLink2" NavigateUrl='<%#"/Pages/Books/ViewBook/Default.aspx?id=" + Eval("BookId") %>' Text='<%# Eval("Title") %>' runat="server">
                  </asp:HyperLink>
              </ItemTemplate>
          </asp:TemplateField>
          <asp:BoundField DataField="Author" HeaderText="Author"></asp:BoundField>
          <asp:BoundField DataField="ISBN" HeaderText="ISBN"></asp:BoundField>
          <asp:BoundField DataField="Price" HeaderText="Price"></asp:BoundField>
          <asp:BoundField DataField="Subject" HeaderText="Subject"></asp:BoundField>
          <asp:BoundField DataField="CourseNumber" HeaderText="Course Number"></asp:BoundField>
          <asp:BoundField DataField="Username" HeaderText="Seller" />
          <asp:TemplateField>
              <ItemTemplate>
                  <asp:ImageButton ImageUrl="~/Assets/Images/add.gif" ID="btnAdd" CommandArgument='<%# Eval("BookId") %>' runat="server" OnCommand="btnAdd_Command" />
              </ItemTemplate>
          </asp:TemplateField>
      </Columns>
  </asp:GridView>
</asp:Content>
